package QC.MessageBox.beans.wxmsg.response;

import io.vertx.core.json.Json;
import io.vertx.core.json.JsonObject;

import java.util.List;

/**
 * Created by Andaren on 2017/7/27.
 * Used for: 微博粉丝列表
 */

public class WBFansList {
    Integer total;
    Integer count;
    String next_uid;
    WBData data;

    public Integer getTotal() {
        return total;
    }

    public WBFansList setTotal(Integer total) {
        this.total = total;
        return this;
    }

    public Integer getCount() {
        return count;
    }

    public WBFansList setCount(Integer count) {
        this.count = count;
        return this;
    }

    public String getNext_uid() {
        return next_uid;
    }

    public WBFansList setNext_uid(String next_uid) {
        this.next_uid = next_uid;
        return this;
    }

    public WBData getData() {
        return data;
    }

    public WBFansList setData(WBData data) {
        this.data = data;
        return this;
    }

    public List<String> getUidList() {
        return this.data.getUids();
    }

    public static void main(String[] args) {
        JsonObject json = new JsonObject("{" +
                "        \"total\":23000," +
                "            \"count\":10000," +
                "            \"data\":{\"openid\":[" +
                "        \"OPENID1\"," +
                "                \"OPENID2\"," +
                "        \"OPENID10000\"" +
                "    ]" +
                "    }," +
                "        \"next_openid\":\"OPENID10000\"" +
                "    }");
        System.out.println(json.encodePrettily());
        FansList fansList = json.mapTo(FansList.class);
        System.out.println(Json.encodePrettily(fansList));

    }
}

/**
 * openid列表
 */
class WBData {
    private List<String> uids;

    public List<String> getUids() {
        return uids;
    }

    public WBData setUids(List<String> uids) {
        this.uids = uids;
        return this;
    }
}


